#pragma once

#include "cordinator.hxx"

class YKCordinator : public Cordinator
{
public:
	YKCordinator(TaskManager* taskManager, FileLog* filelog = NULL);

protected:
	
	virtual void Execute(Thread::Arg);
	virtual void AfterAction(Task* task);
	virtual void PreAction(Task* task);
	virtual bool NextAction(Task* task);

	bool LoadYKTasks(void);
	int SpawnYKTasks(void);

	int CaptchaTaskNum(void) const;

private:
	std::vector<Task*> spawns;
	mutable Mutex spawnsInUse;
};